from appium import webdriver
from time import sleep
def gaode_map():
    desired_caps = {}
    desired_caps['platformName'] = 'Android'
    desired_caps['platformVersion'] = '7'
    desired_caps['deviceName'] = '127.0.0.1:62001'
    desired_caps['app'] = r'D:\apk\GaoDeMap.apk'
    desired_caps['appPackage'] = r'com.autonavi.minimap'
    desired_caps['appActivity'] = r'com.autonavi.map.activity.SplashActivity'
    desired_caps['noReset'] = False
    dr = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)
    dr.implicitly_wait(10)  # 隐式等待
    sleep(3)
    return dr
if __name__ == '__main__':
    gaode_map()